package cn.sxt.userscenter.users.pojo;

import java.util.Date;

/**
 * 用户的扩展表的POJO
 * @author PC-CZ
 *
 */
public class AUsersExtend {

	int id;
	int usersId;
	byte idCardType;
	String idCardNum;
	String idCardHead;
	String idCardBack;
	String idCardHand;
	Date emailSendTime;
	String emailSendCode;
	Date phoneSendTime;
	String phoneSendCode;
	Date createTime;
	Date updateTime;
	
	//字符串描述
	private String idCardTypeStr;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getUserId() {
		return usersId;
	}

	public void setUserId(int userId) {
		this.usersId = userId;
	}

	public byte getIdCardType() {
		return idCardType;
	}

	public void setIdCardType(byte idCardType) {
		this.idCardType = idCardType;
	}

	public String getIdCardNum() {
		return idCardNum;
	}

	public void setIdCardNum(String idCardNum) {
		this.idCardNum = idCardNum;
	}

	public String getIdCardHead() {
		return idCardHead;
	}

	public void setIdCardHead(String idCardHead) {
		this.idCardHead = idCardHead;
	}

	public String getIdCardBack() {
		return idCardBack;
	}

	public void setIdCardBack(String idCardBack) {
		this.idCardBack = idCardBack;
	}

	public String getIdCardHand() {
		return idCardHand;
	}

	public void setIdCardHand(String idCardHand) {
		this.idCardHand = idCardHand;
	}

	public Date getEmailSendTime() {
		return emailSendTime;
	}

	public void setEmailSendTime(Date emailSendTime) {
		this.emailSendTime = emailSendTime;
	}

	public String getEmailSendCode() {
		return emailSendCode;
	}

	public void setEmailSendCode(String emailSendCode) {
		this.emailSendCode = emailSendCode;
	}

	public Date getPhoneSendTime() {
		return phoneSendTime;
	}

	public void setPhoneSendTime(Date phoneSendTime) {
		this.phoneSendTime = phoneSendTime;
	}

	public String getPhoneSendCode() {
		return phoneSendCode;
	}

	public void setPhoneSendCode(String phoneSendCode) {
		this.phoneSendCode = phoneSendCode;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getIdCardTypeStr() {
		//从枚举中取值
		AUserExtendEnum[] userExtendEnums = AUserExtendEnum.values();
		for(int i=0; i <userExtendEnums.length; i++){
			AUserExtendEnum userExtendEnum = userExtendEnums[i];
			if(userExtendEnum.toString().indexOf("IDCARDTYPE_") != -1
					&& userExtendEnum.getStatus() == this.getIdCardType()){
				this.idCardTypeStr = userExtendEnum.getName();
			}
		}
		return idCardTypeStr;
	}
	
	
}
